<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>10-求1-100之间整数累加的和</title>
	</head>
	<body>
		<script type="text/javascript">
			//1-100之间
			//定义一个变量去接收它的值
			var sum = 0;
			for(var i=1;i<=100;i++){
				//sum = sum +i;
				sum+=i;
			}
			console.log("总和::"+sum);//总和::5050
		</script>
	</body>
</html>
